package com.njym.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.njym.dao.StatisticalAnalysisMapper;
import com.njym.service.StatisticalAnalysisService;
import com.njym.vo.StatisticalAnalysisVo;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @Created with IDEA
 * @description:
 * @author: yh
 * @create: 2018-09-11 16:06
 **/
@Service
public class StatisticalAnalysisServiceImpl extends ServiceImpl<StatisticalAnalysisMapper, StatisticalAnalysisVo> implements StatisticalAnalysisService {
    @Override
    public List<StatisticalAnalysisVo> getStatisticalAnalysis(Date start, Date end, String orgId, String modeId) {
        return baseMapper.getStatisticalAnalysis(start, end, orgId,modeId);
    }

    @Override
    public String getStatisticalByChannelId(Date start, Date end, String channelId) {
        return baseMapper.getStatisticalByChannelId(start,end,channelId);
    }

    @Override
    public List<StatisticalAnalysisVo> getStatisticalAnalysisChannel(Date start, Date end, String orgId, String channelId) {
        return baseMapper.getStatisticalAnalysisChannel(start, end, orgId, channelId);
    }

    @Override
    public Page<StatisticalAnalysisVo> getStatisticalAnalysisDetail(Page page,Date start, Date end, String orgId, String modeId, String channelId) {
        return page
        .setRecords(baseMapper.getStatisticalAnalysisDetail(page, start, end, orgId, modeId, channelId));
    }
}
